package com.zxz.controller;

import com.zxz.aop.TestAspectAnno;
import com.zxz.vo.JsonResult;
import com.zxz.vo.TestVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @TestAspectAnno
    @GetMapping(value = "/test1")
    public JsonResult<String> test1() {
        return JsonResult.success("ok");
    }

    @TestAspectAnno(name = "#args[0].name")
    @GetMapping(value = "test2")
    public JsonResult<Boolean> test2(TestVo vo) throws Exception {
        throw new Exception("error");
    }
}
